﻿@model BlondeHeaven.ViewModels.ShopModelView
@{
    ViewData["Title"] = "Details";
}


<style>
    .a123 {
        height: 200px;
        width: 200px;
        background-color: red;
        margin-left: 450px;
    }
</style>

@foreach (var noodle in Model.ShopKeepers)
{
    <div class="col-sm-4 col-lg-4 col-md-4">
        <img src="@noodle.Photo" width="300" alt="">
        <div class="thumbnail">
            <div class="caption">
                <h3 class="pull-right">￥@noodle.Name</h3>
                <p>@noodle.Sales</p>
                <h3>我是店铺</h3>
            </div>
        </div>
    </div>

    @if (User.IsInRole("Admin"))
    {
        <div>
            <h1>权限：Admin可见</h1>
            <h3>
                <a asp-controller="Commodity"
                   asp-action="Create"
                   asp-route-id="@noodle.Id"> 点我增加商品</a>
            </h3>
        </div>
    }
}

<div class="list-group">

    @foreach (var feedback in Model.Commoditys)
    {
        <div class="a123">
            <img src="@feedback.Photo" alt="">
            <h5 class="list-group-item-heading">@feedback.Name</h5>
            <h3>
                <a asp-controller="Order"
                   asp-action="Create"
                   asp-route-id="@feedback.Id">点我下单</a>
            </h3>
            <h3>
                <a asp-controller="Commodity"
                   asp-action="Details"
                   asp-route-id="@feedback.Id">查看详细</a>
            </h3>
            <p class="list-group-item-text">@feedback.Price</p>
        </div>
    }

</div>
<div>
    <a asp-action="Index">Back to List</a>
</div>
